package com.yfp.client.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yfp.client.domain.ClientBill;
import com.yfp.client.domain.OrderGiftGold;
import com.yfp.client.domain.dto.StoredResultsDTO;

import java.util.List;

/**
 *
 * @description 针对表【order_gift_gold】的数据库操作Service
 * @createDate 2024-11-28 15:59:48
 */
public interface OrderGiftGoldService extends IService<OrderGiftGold> {

    /**
     * 根据订单orderList号查询订单赠送金
     *
     * @param orderListId
     * @return
     */
    List<OrderGiftGold> listByOrderListId(String orderListId);

    void addOrderGiftGold(List<OrderGiftGold> orderGiftGolds);

    /**
     * 根据订单orderCombo号查询订单赠送金
     *
     * @param orderId
     * @return
     */
    List<OrderGiftGold> listByOrderId(String orderId);

    /**
     * 部分退款计算
     *
     * @param orderGiftGoldList
     * @param storedResultsDTO
     * @return
     */
    List<OrderGiftGold> calculatePartialRefund(List<OrderGiftGold> orderGiftGoldList, StoredResultsDTO storedResultsDTO);

    /**
     * 计算比例
     *
     * @param orderGiftGolds
     * @return
     */
    ClientBill lastRatio(List<OrderGiftGold> orderGiftGolds);
}
